
<p class="rubrik">
<? 
//print_r($skills_by_name);






$tmpl = array ( 'table_open'  => '<table class="rubrik" style="width:100%;">' );
$this->table->set_template($tmpl); 

if($this->uri->segment(3) == "name") {
$this->table->set_heading(array('Skill name', 'Stats','','','Category')); 
    foreach($skills_by_name as $n) {
$this->table->add_row(array($n->name, $n->stat1,$n->stat2,$n->stat3,'Category')); 

    /*echo $n->name." "; 
    echo $n->stat1;
    if(isset($n->stat2)) { echo "/".$n->stat2; }
    if(isset($n->stat3)) { echo "/".$n->stat3; }

    echo br();*/


    }

    echo $this->table->generate();
}
if($this->uri->segment(3) == "category") {
    foreach($skills_by_category as $c) {


    echo $c->name." "; 
    echo $c->stat1;
    if(isset($c->stat2)) { echo "/".$c->stat2; }
    if(isset($c->stat3)) { echo "/".$c->stat3; }

    echo br();


    }

}

?>

</br>
